﻿using System;
using System.Windows.Input;
using SilentWebsite.ViewModels.Helpers;

namespace SilentWebsite.ViewModels.Commands
{
    public class NavigateCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public NavigationPageType Type { get; set; }

        public bool CanExecute(object parameter)
        {
            return parameter != null;
        }
        public void Execute(object parameter)
        {
            NavigationService.Navigate(parameter.ToString(), Type);
        }
    }
}